<!-- 采用html5  -->
<!DOCTYPE html>
<html>


<head>


    <meta charset="UTF-8">

    <!-- 页面显示适应移动设备 -->
    <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">

    <title>我的APP</title>
    <link rel="stylesheet" href="resources\we-vue\style.css">
    <link rel="stylesheet" href="resources\css\font-awesome.min.css">
    <style>
        /*元素选择器*/
        html {
            height: 100%;
        }
        body {
            height: 100%;
            padding: 0px;
            /*内边距*/
            margin: 0px;
            /*外边距*/
        }
        .my-title{
            font-size:30px;
            text-align: center;/*水平居中*/
            color:#111111;
            padding-top:10px;
            padding-bottom:0px;
        }
    </style>

</head>

<body>

    <!-- div ：矩形区域 -->
    <div id="app">
        <wv-header title="并夕夕" :fixed="false" background-color="#ff0033">
            <div slot="left">
                <i class="fa fa-angle-left" @click="back"></i>
            </div>
        </wv-header>
        <div class="my-title">收货地址</div>
        <div style="padding-left:3px;padding-right:3px;box-sizing: border-box;">
            <wv-group>
                    <wv-textarea :placeholder="dep.b_add" :rows="6" v-model="emp.e_add"></wv-textarea>
            </wv-group>
            <wv-button type="warn" @click="ko" style="margin-top:20px;">确认</wv-button>
        </div>

    </div>

</body>

<script src="resources\js\vue.min.js"></script>
<script src="resources\js\jquery.min.js"></script>
<script src="resources\we-vue\index.js"></script>
<script src="resources\layer_mobile\layer.js"></script>
<script src="resources\js\my.js"></script>

<script>
    //Vue对象的作用就是渲染界面,需要绑定一个元素
    new Vue({
        el: '#app',
        data: {
            dep: {},
            emp: {
                e_add: '',
            }
        },
        methods: {
            ko() {
                if (this.emp.e_add == '') {
                    //Toast.fail('请输入收货地址！');
                    TopTips('请输入收货地址！');
                    return;
                }
                Serv.operate(
                    {
                        url: '/dizhi.jsp',
                        data: this.emp
                    },
                    () => {
                        setTimeout(
                            () => {
                                //通过js向另一个页面跳转
                                window.location.href = 'person.html';
                            },
                            1000
                        );
                    }
                );
            },
            back() {
                window.location.href = 'person.html';
            },
            loadList() {
                Serv.loadData({url:'/person.jsp'}, (dep) => {
                    this.dep = dep;
                });
            },
        },
        mounted() {
            this.loadList();
        },
    }); 
</script>

</html>